﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FourierTransformPlugin
{
    public partial class ButterworthForm : Form
    {
        public ButterworthForm()
        {
            InitializeComponent();
        }

        public int GetOrder()
        {
            return Convert.ToInt32(orderUpDown.Value);
        }

        public int GetRadius()
        {
            return Convert.ToInt32(radiusUpDown.Value);
        }

        private void okButton_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
        }

        private void cancelButton_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
        }

        static decimal rad = 32, order = 1;

        private void ButterworthForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            rad = radiusUpDown.Value;
            order = orderUpDown.Value;
        }

        private void ButterworthForm_Load(object sender, EventArgs e)
        {
            radiusUpDown.Value = rad;
            orderUpDown.Value = order;
        }

        public void SetOrderEnabled(bool enabled)
        {
            orderUpDown.Enabled = enabled;
        }
    }
}
